package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(value = "采购车")
@TableName("t_buy_cart")
public class BuyCartBean {
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_buyId",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "采购价")
    @TableField("b_price")
    private Integer buyPrice;
    @ApiModelProperty(value = "采购数量")
    @TableField("b_num")
    private Integer buyNum;
    @ApiModelProperty(value = "采购人ID")
    @TableField("fk_userId")
    private Integer userId;
    @ApiModelProperty(value = "库存商品ID")
    @TableField("fk_shopId")
    private String stockShopId;

    @TableField(exist = false)
    private StockShopBean stockShop;

    public BuyCartBean() {
    }

    public BuyCartBean(Integer buyPrice, Integer buyNum, Integer userId, String stockShopId) {
        this.buyPrice = buyPrice;
        this.buyNum = buyNum;
        this.userId = userId;
        this.stockShopId = stockShopId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getBuyPrice() {
        return buyPrice;
    }

    public void setBuyPrice(Integer buyPrice) {
        this.buyPrice = buyPrice;
    }

    public Integer getBuyNum() {
        return buyNum;
    }

    public void setBuyNum(Integer buyNum) {
        this.buyNum = buyNum;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getStockShopId() {
        return stockShopId;
    }

    public void setStockShopId(String stockShopId) {
        this.stockShopId = stockShopId;
    }

    public StockShopBean getStockShop() {
        return stockShop;
    }

    public void setStockShop(StockShopBean stockShop) {
        this.stockShop = stockShop;
    }

    @Override
    public String toString() {
        return "BuyCartBean{" +
                "id=" + id +
                ", buyPrice=" + buyPrice +
                ", buyNum=" + buyNum +
                ", userId=" + userId +
                ", stockShopId=" + stockShopId +
                ", stockShop=" + stockShop +
                '}';
    }
}
